package com.example.entity;

import org.springframework.stereotype.Component;

import javax.annotation.Generated;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 * @date 2020/8/13 12:55
 */

@Component
public class Employee {
    private int id;
    @Size(max = 150,min = 0)
    private int age;
    @NotNull(message = "名字不能为空")
    private String name;
    @NotNull(message = "性别不能为空")
    private String sex;
    @NotNull(message = "地址不能为空")
    private String address;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }
}
